home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c
- Subject: Re: ERR with typedef...lvalue
- Date: 21 Feb 1996 09:53:35 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4geq2v$jse@hpbblb.bbn.hp.com>
- References: <1996Feb15.190109@nyssa.swt.edu>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:1996Feb15.190109@nyssa.swt.edu
-
- kv09845@nyssa.swt.edu (They Run, Sheep To The Fold) wrote:
- >
- >The following is a program I can't seem to get to compile. It keeps giving me
- >an error. Would anyone happen to know why. I'm sure it's simple, but then, so
- >am I. Any help greatly appreciated.
- >
- >THE SOURCE CODE:
- >----------------
- >
- >#include <stdio.h>
- >
- >main ()
- >{
- > typedef char STRING[81];
- >
- > STRING text, input_line;
- >
- > text = "this is the text string";
- > input_line = "this is the input_line string";
- text and input_line are arrays, you have to fill them with strcpy:
- strcpy(text, "this is the text string");
- strcpy(input_line, "this is the input_line string");
-
- >
- > printf("%s\n", text);
- > printf("%s\n", input_line);
- >
- >}
- Good luck,
- Matthias
-
-